<div class="head">
    <div class="header">
        <img src="/index/assets/logo/logo.png?v=1" alt="" class="logo">

        <div class="header-search">
            <form action="">
              <i class="iconfont" style="color:#e82433">&#xe627;</i>
                <!--<img src="/index/assets/icon/search2.png" alt="" onclick="$('form').submit()">-->
                <input type="text" placeholder="请输入关键词..." name="keyword">
            </form>
        </div>
        <i class="iconfont" style="float:right;color:#fff;font-size:30px;">&#xe634;</i>

        <p style="clear:both;"></p>
    </div>


    <div class="navs">

        {foreach $types as $k=> $v}
        <a href="{if $v.url}{:url('index/iframe')}?title={$v.type_name}&url={$v.url}{else/}/?type={$v.id}{/if}" class="{if $v.id==$type}active{/if}" >{$v.type_name}</a>
        {/foreach}
    </div>
</div>

<script>
   function switchOn(obj){
       $(obj).addClass('active').siblings().removeClass('active')
   }
</script>